<?php

class Security extends Model
{
  /*variabels to be pre-defined here*/
  
  
  
  function __construct() {
  }
  
  //Encrypts passwords with sha512 to 128 characters long
  function EncPws($x)
  {
    $salt = '$%^&*(*&%';
    $x = hash('sha512',$salt.$x.$salt);
    return $x;
   }
   
   //cleanse user input, ready for input into db
   function sanitise($x)
   {
     $x = mysql_real_escape_string(trim($x));
     return $x;
   }
}